package com.cxx.purchasecharge.dal;

import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import com.cxx.purchasecharge.core.model.persistence.PaymentAccount;
import com.cxx.purchasecharge.dal.common.GenericCRUDDao;

@Transactional
public interface PaymentAccountDao extends GenericCRUDDao <PaymentAccount, Long>
{

    public PaymentAccount findById (long id);

    @Query (value = "select c from PaymentAccount c where c.name=?1")
    public PaymentAccount findByName (String name);

    @Query (value = "select c from PaymentAccount c where c.number=?1")
    public PaymentAccount findByNumber (String number);

}
